/*
 * @(#)IntColumn.java	2016-7-25 下午2:33:36
 * smd
 * Copyright 2016 Thuisoft, Inc. All rights reserved.
 * THUNISOFT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.happut.cmpt.model.column;

import com.happut.cmpt.model.Column;

/**
 * IntColumn
 * @author wfei
 * @time 2016-7-25下午2:33:36
 */
public class DateTimeColumn extends Column  {
    /* (non-Javadoc)
     * @see com.happut.cmpt.model.Column#toColumnSQL()
     */
    @Override
    public String toColumnSQL(boolean needComma) {
        StringBuffer sql = new StringBuffer();
        sql.append(getName());
        sql.append(" datetime");
        if(needComma){
            sql.append(",");
        }
        sql.append(" -- "+getNick());
        if (getIsNull()!=null && !getIsNull()) {
            sql.append(" not null");
        }
        return sql.toString();
    }

}
